<?php
$this->pageTitle = "Products in " . $cat['Category']['category_name'] . ': ' . $cat['Subcategory']['subcategory_name'];
$open = Configure::read('Delivery.is_open');
$m = $this->requestAction('/members/getLoggedInId');
?><h2><?=$cat['Category']['category_name']?>: <?=$cat['Subcategory']['subcategory_name']?></h2>
<div id="breadcrumbs">
<?=$html->link('Categories','/categories');?> &gt; <?=$html->link($cat['Category']['category_name'] . ': ' . $cat['Subcategory']['subcategory_name'],'/subcategories/view/' . $cat['Subcategory']['subcategory_id']);?>
</div>
<?php
if (!$open) {
	echo '<p class="note">Note: prices may be subject to change before the ordering period opens.</p>';
}
$quicklinks = array();

foreach($products as $product) {
	$pass = array('product'=>$product,'open'=>$open,'m'=>$m);
	echo $this->renderElement('product',$pass);
  if (!isset($quicklinks[$product['Member']['business_name']])) {
  	$quicklinks[$product['Member']['business_name']] = $html->link('About ' . $product['Member']['business_name'],array('controller' => 'producers', 'action' => 'about', $product['Member']['username']));
  }
}

ksort($quicklinks);
$this->set('quicklinks', $quicklinks);

?>
<div style="clear:both"></div>